package com.cryann.mqttserver.mqttProcess;

import com.cryann.mqttserver.service.MsgStoreService;
import io.netty.channel.Channel;
import io.netty.handler.codec.mqtt.MqttMessage;
import io.netty.handler.codec.mqtt.MqttMessageType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author cRyann
 * @date 2018/12/24 0024 10:22
 * @description:
 */
@Component
@Slf4j
@ProcessType(MqttMessageType.PUBCOMP)
public class Pubcomp implements BasicProcess<MqttMessage> {
    @Autowired
    MsgStoreService msgStoreService;

    @Override
    public void process(Channel ctx, MqttMessage mqttMessage) {
        // del Msg
        msgStoreService.pollMsg(ctx);
    }
}
